package com.snail.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.snail.dto.VideoCommentDTO;
import com.snail.model.pojo.study.BizCourseVideoComment;
import com.snail.service.impl.BizCourseVideoCommentServiceImpl;
import org.springframework.scheduling.annotation.Scheduled;

import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.TimeUnit;

/**
 * @Date 2025/8/13 11:39
 * @Author yangming
 * @Description 针对表【Biz_course_video_comment(评论表)】的数据库操作Service
 **/
public interface BizCourseVideoCommentService extends IService<BizCourseVideoComment> {
    /**
     * 保存评论到Redis
     */
     void saveCommentToRedis(VideoCommentDTO commentDTO);

    /**
     * 从Redis查询视频评论
     */
     List<Object> getCommentsFromRedis(Long videoId);
    /**
     * 同步Redis评论到数据库
     */
    void syncCommentsToDb();

    void syncComments();
    /**
     * 获取视频评论总条数
     */
    Long getCommentCount(Long videoId);
    /**
     * 删除视频评论
     */
    boolean deleteComment(Long commentId, Long videoId, Long userId);
}
